﻿//using System.Collections.Generic;
//using System.Data;
//using System.Data.Common;
//using MyFloridaHouse.DataAccess.Extensions;
//using MyFloridaHouse.libSvDTO;
//using MyFloridaHouse.LibDTO;
//using System.Data.SqlClient;
//using MyFloridaHouse.DataAccess.DTO;

//namespace MyFloridaHouse.DataAccess
//{

//    public partial class DAL_CensusData
//    {



//        /// <summary>
//        /// [Future] Gets the region I ds in view.
//        /// </summary>
//        /// <param name="iZoomLevel">The i zoom level.</param>
//        /// <param name="iLayerID">The i layer ID.</param>
//        /// <param name="iNorth">The i north.</param>
//        /// <param name="iEast">The i east.</param>
//        /// <param name="iSouth">The i south.</param>
//        /// <param name="iWest">The i west.</param>
//        /// <returns></returns>
//        /// <remarks>[Future] SPROC: usp_moGetregionIDsInView</remarks>
//        public List<SQLRegionDTO> GetRegionIDsInView(double iZoomlevel, int iLayerID, double iNorth, double iEast, double iSouth, double iWest)
//        {
//            //List<int> itemList = new List<int>();
//            List<SQLRegionDTO> itemList = new List<SQLRegionDTO>();

//            string storedProcedureName = "usp_moGetregionIDsInView";

//            using (SqlConnection db = Connect())
//            {
//                SqlCommand StoredProcedureCommand = new SqlCommand(storedProcedureName, db);
//                StoredProcedureCommand.CommandType = CommandType.StoredProcedure;
//                SqlParameter dataPartIDParm = StoredProcedureCommand.Parameters.AddWithValue("iZoomlevel", iZoomlevel);
//                dataPartIDParm.Direction = ParameterDirection.Input;
//                SqlParameter dataPartIDParm2 = StoredProcedureCommand.Parameters.AddWithValue("iLayerID", iLayerID);
//                dataPartIDParm2.Direction = ParameterDirection.Input;
//                SqlParameter dataPartIDParm3 = StoredProcedureCommand.Parameters.AddWithValue("iNorth", iNorth);
//                dataPartIDParm3.Direction = ParameterDirection.Input;
//                SqlParameter dataPartIDParm4 = StoredProcedureCommand.Parameters.AddWithValue("iEast", iEast);
//                dataPartIDParm4.Direction = ParameterDirection.Input;
//                SqlParameter dataPartIDParm5 = StoredProcedureCommand.Parameters.AddWithValue("iSouth", iSouth);
//                dataPartIDParm5.Direction = ParameterDirection.Input;
//                SqlParameter dataPartIDParm6 = StoredProcedureCommand.Parameters.AddWithValue("iWest", iWest);
//                dataPartIDParm6.Direction = ParameterDirection.Input;

//                db.Open();
//                using (SqlDataReader rdr = StoredProcedureCommand.ExecuteReader())
//                {
//                    while (rdr.Read())
//                    {
//                        itemList.Add(RegionDTODataContract.DataContract(rdr));
//                    }
//                }
//            }

//            //Database db = Connect();
//            //DbCommand dbCommand = db.GetStoredProcCommand("usp_moGetregionIDsInView");
//            //db.AddInParameter(dbCommand, "iZoomlevel", DbType.Double, iZoomLevel);
//            //db.AddInParameter(dbCommand, "iLayerID", DbType.Int32, iLayerID);
//            //db.AddInParameter(dbCommand, "iNorth", DbType.Double, iNorth);
//            //db.AddInParameter(dbCommand, "iEast", DbType.Double, iEast);
//            //db.AddInParameter(dbCommand, "iSouth", DbType.Double, iSouth);
//            //db.AddInParameter(dbCommand, "iWest", DbType.Double, iWest);
//            //using (IDataReader rdr = db.ExecuteReader(dbCommand))
//            //{
//            //    while (rdr.Read())
//            //    {
//            //        //regionList.Add(rdr["regionID"] is DBNull ? 0 : Convert.ToInt32(rdr["regionID"]));
//            //        itemList.Add(RegionDTODataContract.DataContract(rdr));
//            //    }
//            //}

//            return itemList;
//        }

//    }
//}
